package com.wsl.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:WangShuliang
 * @Description:
 * @Date:Created in 11:14 2018/1/8
 * @Modified by:
 */
@RestController
public class Controller {
    @RequestMapping("getAll")
    public String get() {
        return "hello wang";
    }

    @RequestMapping("getParameter")
    public String testBeforeService(String key, String value) {
        return "key=" + key + " value=" + value;
    }
    @RequestMapping("getAfterThrowing")
    public String testAfterThrowing() {
        throw  new NullPointerException();
    }
    @RequestMapping("testAroudService")
    public String testAroudService(String key){
        return "环绕通知: "+key;
    }

}